/**
 * Copyright By Nanjing Fujitsu Nanda Software Technology Co., Ltd
 * 上午8:47:15
 * Guide.java
 * 
 */
package com.fujitsu.nanjing.mobile.model;

import org.ksoap2.serialization.KvmSerializable;
import org.ksoap2.serialization.PropertyInfo;

import java.util.Hashtable;

/**
 * @author qixb.fnst
 * 
 *         <pre>
 * 离岗回岗信息
 * </pre>
 */
public class Guide implements KvmSerializable {
    private String workDate;
    private String leaveTime;
    private String backTime;
    private int reasonType;
    private int workRange;

    @Override
    public String toString() {
        return "Guide [workDate=" + workDate + ", leaveTime=" + leaveTime
                + ", backTime=" + backTime + ", reasonType=" + reasonType + "]";
    }

    public String getWorkDate() {
        return workDate;
    }

    public void setWorkDate(String workDate) {
        this.workDate = workDate;
    }

    public String getLeaveTime() {
        return leaveTime;
    }

    public void setLeaveTime(String leaveTime) {
        this.leaveTime = leaveTime;
    }

    public String getBackTime() {
        return backTime;
    }

    public void setBackTime(String backTime) {
        this.backTime = backTime;
    }

    public int getReasonType() {
        return reasonType;
    }

    public void setReasonType(int reasonType) {
        this.reasonType = reasonType;
    }

    @Override
    public Object getProperty(int arg0) {
        switch (arg0) {
        case 0:
            return this.workDate;
        case 1:
            return this.leaveTime;
        case 2:
            return this.backTime;
        case 3:
            return this.reasonType;
        case 4:
            return this.workRange;

        default:
            break;
        }
        return null;
    }

    @Override
    public int getPropertyCount() {
        return 5;
    }

    @SuppressWarnings("rawtypes")
    @Override
    public void getPropertyInfo(int arg0, Hashtable arg1, PropertyInfo arg2) {

        switch (arg0) {
        case 0:
            arg2.name = "workDate";
            arg2.type = PropertyInfo.STRING_CLASS;
            break;
        case 1:
            arg2.name = "leaveTime";
            arg2.type = PropertyInfo.STRING_CLASS;
            break;
        case 2:
            arg2.name = "backTime";
            arg2.type = PropertyInfo.STRING_CLASS;
            break;
        case 3:
            arg2.name = "reasonType";
            arg2.type = PropertyInfo.INTEGER_CLASS;
            break;
        case 4:
            arg2.name = "workRange";
            arg2.type = PropertyInfo.INTEGER_CLASS;
            break;

        default:
            break;
        }
    }

    @Override
    public void setProperty(int arg0, Object arg1) {
        switch (arg0) {
        case 0:
            this.workDate = arg1.toString();
            break;
        case 1:
            this.leaveTime = arg1.toString();
            break;
        case 2:
            this.backTime = arg1.toString();
            break;
        case 3:
            this.reasonType = Integer.parseInt(arg1.toString());
            break;
        case 4:
            this.workRange = Integer.parseInt(arg1.toString());
            break;
        default:
            break;
        }
    }

    /**
     * @return the workRange
     */
    public int getWorkRange() {
        return workRange;
    }

    /**
     * @param workRange the workRange to set
     */
    public void setWorkRange(int workRange) {
        this.workRange = workRange;
    }

}
